-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
STYLE: fix pylint redefined-outer-name warnings #49822
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
STYLE: fix pylint redefined-outer-name warnings #49822
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks for working on this!
pandas/util/_doctools.py
Outdated
@@ -168,28 +168,28 @@ def _make_table(self, ax, df, title: str, height: float | None = None) -> None: | |||
|
|||
|
|||
if __name__ == "__main__": | |||
import matplotlib.pyplot as plt | |||
import matplotlib.pyplot as pyplot |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
instead of renaming this (as plt
is a pretty standard import), how about we put:
def main():
import matplotlib.pyplot as plt
p = TablePlotter()
<put the rest of the file here>
and then, right underneat that:
if __name__ == "__main__":
main()
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Got it.
@MarcoGorelli Addressed the requested changes in |
can you run the pre-commit checks? see the contributing guide for how |
Will do. |
@MarcoGorelli I ran the pre-commit commands. The |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks @JasmandeepKaur !
Glad I could help. Thanks for letting me contribute! |
* STYLE: fix pylint redefined-outer-name warnings * removing _test_decorators.py * Moving into a main function * pre-commit changes
Fixed
redefined-outer-name
linting issue in the following files (Towards #49656)pandas/util/_decorators.py
pandas/util/_doctools.py
pandas/util/_test_decorators.py